package com.yilin.tms.core.entity.system.param;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yilin.tms.core.commons.base.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;


/**
 * 专业车辆类型
 */
@Entity
@Table(name = "param_truck_type")
@TableName("param_truck_type")
public class TruckType extends BaseEntity {
    public enum TowingType {
        none(0, "非挂车辆"),
        tractor(1, "牵引车(车头)"),
        trailer(2, "挂车(车尾)");
        @EnumValue
        public Integer index;
        public String name;

        TowingType(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }

    public enum IsTrailer {
        no(0, "牵引车/普通车"),
        yes(1, "挂车车厢");
        @EnumValue
        public Integer index;
        public String name;

        IsTrailer(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }

    //父ID
    @Column(name = "parent_id")
    private String parentId;
    @Column
    private String code;
    @Column
    private String name;
    @Column(name = "type_level")
    private Integer typeLevel;
    @Column(name = "is_trailer")
    private IsTrailer isTrailer;//是否挂车 不含牵引车
    @Column(name = "towing_type")
    private TowingType towingType;//普通车/牵引车/挂车类型
    @Column
    private String remark;

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getTypeLevel() {
        return typeLevel;
    }

    public void setTypeLevel(Integer typeLevel) {
        this.typeLevel = typeLevel;
    }

    public IsTrailer getIsTrailer() {
        return isTrailer;
    }

    public void setIsTrailer(IsTrailer isTrailer) {
        this.isTrailer = isTrailer;
    }

    public TowingType getTowingType() {
        return towingType;
    }

    public void setTowingType(TowingType towingType) {
        this.towingType = towingType;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

}
